package Models;

import java.util.Date;

public class POSLineItems {
    //private SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
    private int id;
    private POSDiscount discount;
    private java.util.Date lineItemTimeStamp;
    private double priceOverRide;
    private POSProductServingType product;
    private int qty;
    private POSSupplyView supply;
    private POSTasterTray tasterTray;

	public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public POSDiscount getDiscount() {
        return discount;
    }

    public void setDiscount(POSDiscount discount) {
        this.discount = discount;
    }
    
    public Date getLineItemTimeStamp() {
        return lineItemTimeStamp;
    }

    public void setLineItemTimeStamp(Date lineItemTimeStamp) {
        this.lineItemTimeStamp = lineItemTimeStamp;
    }

    public double getPriceOverRide() {
        return priceOverRide;
    }

    public void setPriceOverRide(double priceOverRide) {
        this.priceOverRide = priceOverRide;
    }

    public POSProductServingType getProduct() {
        return product;
    }

    public void setProduct(POSProductServingType product) {
        this.product = product;
    }

    public int getQty() {
        return qty;
    }

    public void setQty(int qty) {
        this.qty = qty;
    }

    public POSSupplyView getSupply() {
        return supply;
    }

    public void setSupply(POSSupplyView supply) {
        this.supply = supply;
    }

    public POSTasterTray getTasterTray() {
		return tasterTray;
	}

	public void setTasterTray(POSTasterTray tasterTray) {
		this.tasterTray = tasterTray;
	}
	
	public String getLineItemString(){
		if(this.getProduct()!=null){
			final String retStr = Integer.toString(this.qty) + "x : " + this.getProduct().getBeerString() 
					+ " - " + this.product.getPSTString();
			return retStr;
		} else if (this.getSupply()!=null) {
			final String retStr = Integer.toString(this.qty) + "x : " + this.getSupply().getSupplyName();
			return retStr;
		} else {
			return "N/A";
		}
	}
}
